#include "common_task.h"

TaskHandle_t StartTaskHandle;

void start_task(void* param){

    taskENTER_CRITICAL();
    //各个外设初始化任务 
    heart_Init();
    gather_Init();
    executeInit();
    blue_tooth_Init();

    //处理任务
    // start_heart_task();
    // Start_Gather_task();
    // executorTaskCreate();
    start_blue_tooth_task();

    vTaskDelete(NULL);
    taskEXIT_CRITICAL();
}

void FreeRtos_start_task(void){

    BaseType_t ret = xTaskCreate(start_task,
        "start_task",
        128,
        NULL,
        2,
        &StartTaskHandle
    );
    if (ret == pdPASS)
    {
        printf("start_task succeed\r\n");
    }
    
    vTaskStartScheduler();
}



